home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Adobe Graphics & Publishing SDK 1996 December
/
Adobe Graphics & Publishing SDK 1996 December.iso
/
mac
/
Premiere 4.2 SDK r3 Mac
/
Examples
/
.h files
/
PremiereBasic.h
< prev
next >
Wrap
Text File
|
1996-01-25
|
41KB
|
1,082 lines
//========================================================================================
//
// PremiereBasic.h - Adobe Premiere¬ include file.
//
// Part of the Adobe Premiere¬ 4.2 Plug-In Developer's Toolkit.
//
// Header file written 10/20/93 by Bryan K. ╥Beaker╙ Ressler.
//
// Copyright ⌐ 1992-96, Adobe Systems Incorporated, all rights reserved worldwide.
//
// Version 1.00 10/20/93 Original version.
// Version 1.01 9/12/94 Updated for 4.0.
// Version 1.02 11/6/95 Updated for Premiere 4.2 and CodeWarrior7 - several new
// globals, see the 4.2 comments below.
//
//========================================================================================
// NOTE: When this file is included by a CodeWarrior project which compiles to 68k code,
// you must turn on MPW C Calling Conventions in the 68K preferences section
// START~ Defs-Globals
pascal long GetAGlobal (long identifier);
pascal void SetAGlobal (long identifier, long value);
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// This is the list of Globals which can be requested.
enum {
gAppVersion = 0, // long Version of Premiere which is running
gSysVersion, // long System software version
gHDLRMethods, // MethodArrayHand list of HDLR modules
gDrawMethods, // MethodArrayHand list of Draw modules
gImageFilters, // short** list of all video filters
gImageValues, // long** list of 'globals' for all filters
gAudioFilters, // short** list of all audio filters
gExportModules, // short** list of all export modules
gZoomModules, // short** list of zoom modules
gDeviceModules, // short** list of device control modules
gHDLRModules, // WindTypeHand list of 'file' HDLR modules
gCaptureModules, // WindTypeHand list of 'Capture' HDLR modules
gToolModules, // WindTypeHand list of 'Tool' HDLR modules
gFileList, // FileHand file queue handle
gFrameHead, // FrameHand frame queue head handle
gFrameTail, // FrameHand frame queue tail handle
gClipList, // ClipHand clip queue handle
gNextID, // long next file/clip ID to be assigned
gUntitledID, // long next untitled file number
gScrapClip, // long clip which is/was on the scrap
gXREFs, // XREFHand handle to the cross reference table
gPrefRate, // long default frame rate
gCurRate, // long frame rate
gMidiFlags, // long MIDI configuration flags
gMidiInit, // long is MIDI initialized?
gMidiRef, // long MIDI port ref num
gTimeTask, // TMTask* pointer to time manager task for MIDI
gInterval, // long interval for above task
gTempo, // long tempo for above task
gMinAudio, // long minimum audio timescale before 'greeking'
gAudioCompare, // long fractional value used with above
gScrapCount, // long last scrap count
gDontInterrupt, // long flag to prevent redraw interrupt
gOpenedProj, // long set if we've opened a project
gJustPrinted, // long set if we just printed a file
gDone, // long set if we should quit
gResFileNum, // long resource file number of Premiere
gStillDefault, // long default length (in frames) for stills
gPluginVRefNum, // long vRefNum of plug-ins folder
gPluginDirID, // long dirID of plug-ins folder
gWorkVRefNum, // long vRefNum of scratch disk
gWorkDirID, // long dirID of plug-ins folder
gTempVRefNum, // long vRefNum of the application
gTempDirID, // long dirID of the application
gPrefVRefNum, // long vRefNum of the prefs file
gPrefDirID, // long dirID of the prefs file
gPrintRec, // THPrint print record
gGWStrip, // GWorldPtr strip buffer
gIconWorld1, // GWorldPtr contains cyan 'A'
gIconWorld2, // GWorldPtr contains yellow 'B'
gIconWorld3, // GWorldPtr stores result of effects
gSmallWorld, // GWorldPtr 8 bit version of above
gIcon_A, // Handle cyan 'A' in handle form
gIcon_B, // Handle cyan 'B' in handle form
gOneBitWorld, // GWorldPtr general purpose 512x256 1-bit deep
gThumbWorld, // GWorldPtr thumbnail sized GWorld
gClipFlag, // long flag to skip recursive updates
gSkipAll, // long flag to skip all remaining files
gCursors, // CCursList list of all of our color cursors
gCodecList, // CodecNameSpecListPtr QuickTime codec name list
gBadFiles, // short** list of missing files
gNetRec, // NetBlock* network protection data block
gRGB2Y, // unsigned char* luminance lookup table pointer
gRGB2UV, // short* chrominance lookup table pointer
gBlips, // BlipRec* sound mixing temporary buffers
gLevels, // LevelRec* table for mixing 8 bit sound
gAudioLimit, // unsigned char* clipping table for 8 bit audio
gDecimalPt, // long decimal point character
gTimeSep, // long separator for time values
gFrameSep, // long separator for frame values
gMultiply, // unsigned char* 8x8 multiply lookup table
gCurDevice, // long currently selected device control
gDeviceState, // long 0=available, 1=in use
gDeviceData, // Handle current device handle
gDeviceName, // char* pointer to current device name
gZoomInfo, // Handle storage used by zoom code
gSpecialRate, // long special rate for audio conversion
gHasOutline, // long set if we have TrueType
gGlobalCancel, // long global cancel flag
gScrapGroup, // ClipGroupHand current group on the scrap, or nil
gWorkWorld, // GWorldPtr non-zero if GetVideo can use this
gBottleNecks, // BottleRec* bottleneck record
gUndoState, // long current undo state
gLastMouse, // Point last mouse position
gLastKeys, // long last modifier keys
gExitToShell, // long old ExitToShell trap value
gTakeID, // long fileID of the 'TAKE' transition
gMaxWidth, // long maximum width for an image
gMaxHeight, // long maximum height for an image
gClipControl, // long type of controller for clip windows
gTreadWorld, // GWorldPtr filled with the 'Tractor Tread' pattern
gFunctions, // FuncList* function key lookup table
gRecursDepth, // long maximum recursion depth
gDontFlush, // long set to prevent audio data flushing
gLayerMode, // long video filter application for layers
gLayerBars, // long set to show layers as bars
gCollapseClips, // long set to open QT clips collapsed
gSafeLayers, // long set to enable safe layers
gOpenAction, // long selects action at startup
gDoInitCursor, // long set to force init cursors
gPickerType, // long color picker type
gLockStillAspect, // long initial aspect state for stills
gBit16OK, // long set if 16-bit audio is OK
gNoAccel, // long set to disable QT acceleration
gKillAppleTalk, // long set to kill AppleTalk on capture
gKilledAppleTalk, // long set if Appletalk has been killed
gLastMenuID, // long the last menu ID we used
gLastMenu, // MenuHandle the last menu we used
gShowFree, // long set to show disk free space
gShowFind, // long set to show find buttons
gNoZooming, // long set to disable clip zooming
gMinDiskSpace, // long minimum disk space allowed before warning
gAudioSkew, // Ptr gamma table for audio display
gAudioStraight, // Ptr linear lookup table for audio
gAudioVolume, // long volume number for audio temp files
gVideoVolume, // long volume number for video temp files
gScrubAmount, // long* ptr to a long, set to cause scrubbing
gHackList, // HackRec** list of data types to merge together
gSysWindow, // WindowPtr pointer to the 'HIDE' window
gVideoZoom, // long zoom/unzoom state for print to video
gZoomMethod, // long hardware/software zooming
gVideoLoop, // long loop print to video
gVideoDelay, // long start/end amount to delay
gPrefTemp, // long storage used by prefs dialog
gXOutPrefs, // OutPrefRec* default output options record
gDITLItem, // long last original DITL item
gTicks, // long the current system TICKS value
gWindowList, // WindowPtr the First window in the window list
gWMgrPort, // GrafPtr main window manager port
gDoubleTime, // long current double click time
gSFSaveDisk, // long current drive used by standard file
gCurDirStore, // long current directoty used by standard file
gPaintWhite, // long current value of the 'PaintWhite' flag
gGrayRgn, // long system GrayRgn
gMenuList, // MenuListHand system menu list
gFontLookup, // FontMapHand list of font name/sizes
gPlugInDate, // long Plug-in modification date checksum
gPlugInName, // long Plug-in name checksum
gMenuCommand, // long Set to execute a menu command
gMenuModifiers, // long The modifiers for the command above
gMenuToCommand, // MenuMapHand menuID to command number lookup
gCommandToMenu, // MenuMapHand command number to menuID lookup
gMenuBitsList, // MenuBitsHand list of menu dimming bits
gAutoSaveTime, // long number of minutes between auto-saves
gLastAutoSave, // long last tick count when auto-save occurred
gScrubRez, // long scrubbing scale factor, powers of 2
gTickNumer, // long Numerator for gTicks scale - 6014
gTickDenom, // long Denominator for above - 100
gLeanMode, // long 1=Use OSEvent calls in main loop
gSaveRef, // long temporary storage for some routines
gDeskCPat, // PixPatHandle Desktop pattern
gAlertSystem, // AlertSysProcPtr Alternate function to handle AlertSystem calls
gAlertTemp, // long Temp location for function above
gColorBars, // long time for color bars display
gScreenMode, // long screen mode to switch to for print to video
gExternalList, // long** List of external module types
gqd, // QDGlobals * pointer to app's A5 QD globals record
gUPPBottleNecks, // UPPBottleRec * like gBottleNecks except with UPPs
gExportRef, // long temp storage for export modules
gDrawRef, // long temp storage for Draw modules
gInternalRef, // long temp storage for Internal routines
gExtendedFuncs, // long bits for activating hidden functionality
gDeskPat, // long B&W Desktop pattern
gMouseNotDown, // long set to 1 if PrStillDown should return false
gLogFades, // long set to 1 to use log scale in audio fading
gQTVers, // long QuickTime version
gAudioPreviewSecs, // long number of seconds to provide for audio previews
gConnectionCount, // long number of open CFM connections on PPC
gHaveDragAndDrop, // long true if we have the drag & drop manager
gParserModules, // short** list of plug-in parsers
gEnhancedRate, // long set to perform enhanced rate conversion
gProcessAudioAt, // long set to process audio internally at higher rate
gProcessAudioBits, // long 0 = 8 bits, 1 = 16 bits
gProcessAudioRate, // long rate to process audio at
gBottleStorage, // Ptr to long[n] storage for bottlenecks
gQTScrub, // long set to use scrub mode for QT movies
gCacheLimit, // long if non-zero, max number of frames allowed in cache
gMovieSave, // long set when a movie is captured
gAddVidProc, // ProcPtr Points to an alternate routine for processing frames
// 4.2 changes -- njs
gProjOpenFunc, // ProcPtr Helper function for project opening status bar
gProjOpenStats, // Ptr Points to a struct that supports the project opening
// status bar.
// Struct is defined in PremierePrivate.h
// Used in HDLR-COMP-SAVE and SUBS-SAVE
gAppSuspended, // non-zero means we're in the background.
// currently only used in Main.c in MainEvent() code...
gBestResize, // non-zero means do high quality downsizing from DRAW modules
gPreDeinterlace, // non-zero means deinterlace at full size from DRAW modules
gVidFilterData, // handle to instance data for all active filters in a compile
gAudFilterData, // handle to instance data for all active filters in a compile
gCompileErr, // Global that a plugin can set if it couldn't render and we should stop compiling.
// fill this in with the error the plugin got rendering (probably out of memory).
gRenderFunc, // New plugin rendering function. See RenderStruct def for more info
// These next two are a hack to fix a problem with QuickTime:
gLastMoovID, // Last QT movie that was drawn
gLastMoovFrame, // Last QT movie frame that was drawn
// 4.2 changes -- njs -- end
gLastGlobal // THE LAST GLOBAL
};
// Extended Functionality Bits
enum {
exfuncConstTools = 1 << 0,
exfuncPopupActions = 1 << 1,
exfuncKeyMovieStop = 1 << 2,
exfuncWaveformExtra = 1 << 3,
exfuncShowMotionPath = 1 << 4,
exfuncAllowOffline = 1 << 5,
exfuncEmbossStyle = 1 << 6,
exfuncNoHalfSizes = 1 << 7,
exfuncFrameBlending = 1 << 8,
exfuncFlattenMovie = 1 << 9,
exfuncSpaceIsPlay = 1 << 10,
exfuncAutoFade = 1 << 11,
exfuncStickyWindows = 1 << 12
};
// START~ Timecode
#define FRPH 108000L /* frames per hour */
#define DFRPH 107892L /* drop frames per hour */
#define FRPTM 18000 /* frames per ten minutes */
#define DFRPTM 17982 /* drop frames per ten minutes */
#define FRPM 1800 /* frames per minute */
#define DFRPM 1798 /* drop frames per minute */
#define FRPS 30 /* frames per second */
#define DF24H 2589408L /* drop frames per 24 hours */
#define F24H 2592000L /* frames per 24 hours */
#define PAL_FRPH 90000L /* PAL frames per hour */
#define PAL_FRPTM 15000 /* PAL frames per 10 minutes */
#define PAL_FRPM 1500 /* PAL frames per minute */
#define PAL_FRPS 25 /* PAL frames per second */
#define PAL_F24H 2160000L /* PAL frames per 24 hours */
#define FILM_FRPS 24
#define FILM_FRPM 1440
#define FILM_FRPTM 14400
#define FILM_FRPH 86400L
#define FILM_F24H 2073600L
#ifndef false
#define false 0
#endif
#ifndef true
#define true 1
#endif
struct fields
{
unsigned int una1:2, hours10:2, hoursu:4, una2:1, minute10:3, minuteu:4,
fmark:1, second10:3, secondu:4, cf:1, df:1, frames10:2, framesu:4;
};
#define DFBIT 0x40L // corresponds to smpte->df
typedef union
{
struct fields fields; // the tens and units of each field can be accessed
long time; // the value can be accessed as one long integer
} smpte;
typedef struct
{
long frames; // binary frame count
char df; // true = DF, false = NDF
char frameRate; // PAL, NTSC, FILM
} BIN_TC; // binary time code
enum {
NON_DROP_FRAME,
DROP_FRAME,
TC_PAL = 0, // 25 frames per second
TC_NTSC, // 30 frames per second
TC_FILM // 24 frames per second
};
/* function prototype declarations */
void StrToBin (StringPtr str,BIN_TC *b, short df, short ntsc);
void BinToStr (BIN_TC *b, StringPtr str);
void BcdToStr (StringPtr str,smpte *bcd);
void BcdToBin (smpte *t, BIN_TC *b, short frameRate);
void BinToBcd (BIN_TC *b, smpte *t, short dur);
void StrToBcd (StringPtr str, smpte *bcd, short frameRate);
// START~ Defs-Types
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// flags for GetVideo
enum {
gvCache = 0x8000,
gvOffScreen = 0x4000,
gvCacheSingles = 0x2000,
gvHalfV = 0x0800,
gvHalfH = 0x0400,
gvFieldsOdd = 0x0200,
gvFieldsEven = 0x0100,
gv1Bit = 0x0001,
gv2Bit = 0x0002,
gv4Bit = 0x0004,
gv8Bit = 0x0008,
gv16Bit = 0x0010,
gv24Bit = 0x0018,
gv32Bit = 0x0020,
gvNone = gv32Bit,
gvDepth = 0x003F,
gvFlags = 0x00FF
};
// flags for GetAudio
enum {
ga5kHz = 0x0001,
ga11kHz = 0x0002,
ga22kHz = 0x0004,
ga44kHz = 0x0008,
ga48kHz = 0x0010,
gaSpecial = 0x0040,
gaImage = 0x0080,
gaStereo = 0x0100,
ga16Bit = 0x0200,
gaDropFrame = 0x0400,
gaNonLinear = 0x0800,
gaTwosComp = 0x1000,
gaCache = 0x8000,
gaFlags = 0x0BFF,
gaRate = 0x00FF
};
//╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤╤
// Definitions for filmstrip info record
#define filmHasFields 1
typedef struct {
long signature; // 'Rand'
long numFrames; // number of frames in the file
long duration; // duration in 30ths
short width; // image width
short height; // image height
short leading; // horizontal dead space between frames
short framesPerSec; // frame rate
long flags; // flag bits
char spare[12]; // some spare data.
} FilmStripRec, **FilmStripHand;
// START~ Int-Bottlenecks
typedef struct {
Ptr srcPtr; // Pointer to total source block
long srcSampleOffset; // Offset to important part of source (in samps)
long srcTotalSampleCount; // Total samples in source block
long srcSampleCount; // Len of this part of source block (in samples)
short srcFlags; // Format of source block
Ptr dstPtr; // Pointer to destination block
long dstSampleCount; // Len of destination block (in samples)
short dstFlags; // Format of destination block
long srcRate;
long dstRate;
long prevDstSamples;
long prevSrcSamples;
} ResampleRec;
typedef struct {
Ptr srcPtr;
long srcSampleCount;
short srcFlags;
Ptr dstPtr;
long dstSampleCount;
short dstFlags;
long convertOffset;
long step;
} AudioMungeRec;
#pragma mpwc off // In these bottleneck routines, a short really is a short in Premiere, so MPW C calling
// conventions must be temporarly turned off.
typedef pascal void (*StretchBitsPtr) (BitMap *srcBits, BitMap* dstBits, Rect *srcRect, Rect *dstRect,
short mode, RgnHandle maskRgn);
typedef pascal void (*DistortPolygonPtr) (GWorldPtr src, GWorldPtr dest, Rect *srcbox, Point *dstpts);
typedef pascal void (*DistortFixedPolygonPtr) (GWorldPtr src, GWorldPtr dest, Rect *srcbox, LongPoint *dstpts);
typedef pascal void (*PolyToPolyPtr) (GWorldPtr src, GWorldPtr dest, Point *srcpts, Point *dstpts);
typedef pascal void (*FixedToFixedPtr) (GWorldPtr src, GWorldPtr dest, LongPoint *srcpts, LongPoint *dstpts);
typedef pascal void (*AudStretchPtr) (Ptr src, long srclen, Ptr dest, long destlen, short flags);
typedef pascal void (*AudMixPtr) (Ptr buf1, long v1, Ptr buf2, long v2, Ptr buf3, long v3,
long width, Ptr dest, short flags);
typedef pascal void (*AudSumPtr) (Ptr src, Ptr dest, long width, long scale, short flags, long part, long total);
typedef pascal void (*AudLimitPtr) (Ptr src, Ptr dest, long width, short flags, long total);
typedef pascal void (*ResamplePtr) (ResampleRec *theRec);
typedef pascal void (*AudioMungePtr) (AudioMungeRec *theRec);
#ifdef AdvancedIncludes
typedef pascal void (*ImageKeyPtr) (GWorldPtr srcworld, GWorldPtr dstworld, GWorldPtr work,
Ptr workbuf, unsigned short level, TrackRec *therec);
#endif
#pragma mpwc reset
typedef struct {
short count; // number of routines
short reserved[14];
StretchBitsPtr StretchBits;
DistortPolygonPtr DistortPolygon;
PolyToPolyPtr MapPolygon;
AudStretchPtr AudioStretch;
AudMixPtr AudioMix;
AudSumPtr AudioSum;
AudLimitPtr AudioLimit;
DistortFixedPolygonPtr DistortFixed;
FixedToFixedPtr FixedToFixed;
#ifdef AdvancedIncludes
ImageKeyPtr ImageKey;
#else
long ImageKey;
#endif
ResamplePtr Resample;
AudioMungePtr AudioMunge;
long unused[1];
} BottleRec;
enum {
bottleStretchBits = 0,
bottleDistortPolygon,
bottleMapPolygon,
bottleAudioStretch,
bottleAudioMix,
bottleAudioSum,
bottleAudioLimit,
bottleDistortFixed,
bottleFixedToFixed,
bottleImageKey,
bottleResample,
bottleAudioMunge,
bottleCount
};
#ifdef PrPPC
enum {
uppStretchBitsProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(BitMap *)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(BitMap *)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(RgnHandle))),
uppDistortPolygonProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Point *))),
uppDistortFixedPolygonProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Rect *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(LongPoint *))),
uppPolyToPolyProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Point *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Point *))),
uppFixedToFixedProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(LongPoint *)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(LongPoint *))),
uppAudStretchProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short))),
uppAudMixProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(8, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(9, SIZE_CODE(sizeof(short))),
uppAudSumProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(7, SIZE_CODE(sizeof(long))),
uppAudLimitProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(long)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(short)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(long))),
#ifdef AdvancedIncludes
uppImageKeyProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(GWorldPtr)))
| STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(Ptr)))
| STACK_ROUTINE_PARAMETER(5, SIZE_CODE(sizeof(unsigned short)))
| STACK_ROUTINE_PARAMETER(6, SIZE_CODE(sizeof(TrackRec *))),
#endif
uppResampleProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(ResampleRec *))),
uppAudioMungeProcPtrInfo = kPascalStackBased
| STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(AudioMungeRec *)))
};
typedef struct {
short count; // number of routines
short reserved[14];
UniversalProcPtr StretchBits;
UniversalProcPtr DistortPolygon;
UniversalProcPtr MapPolygon;
UniversalProcPtr AudioStretch;
UniversalProcPtr AudioMix;
UniversalProcPtr AudioSum;
UniversalProcPtr AudioLimit;
UniversalProcPtr DistortFixed;
UniversalProcPtr FixedToFixed;
#ifdef AdvancedIncludes
UniversalProcPtr ImageKey;
#else
long ImageKey;
#endif
UniversalProcPtr Resample;
UniversalProcPtr AudioMunge;
long unused[1];
} UPPBottleRec;
#endif
typedef pascal void (*BottleProc) (short selector, BottleRec *therec);
// START~ SUBS-Blocks
// Header definition for data blocks
//
// Blocks passed to an export module have a header followed by any
// static data, then any sub-blocks, which themselves have
// headers, static data, and sub-blocks...
typedef struct {
long size; // total size of this block, including static data and sub-blocks
long dataSize; // the static data size for this block
long type; // the block type (basically, an OSType)
long theID; // the block ID, for blocks which do not need an ID, 0 is used
} BlockRec;
// These are the routines used to build and take apart data blocks
void AppendBlock (BlockRec **dstBlock, BlockRec **srcBlock);
void ExtendBlock (BlockRec **dstBlock, BlockRec **srcBlock);
void NextBlock (BlockRec **srcBlock);
void ExtractBlockData (BlockRec *srcBlock, void *destination, long *maxlen);
long CountTypeBlocks (long type, BlockRec *srcBlock);
BlockRec **BuildBlock (long type, long theID, long length, void *data);
BlockRec *FindBlock (long type, long theID, long index, BlockRec *srcBlock);
BlockRec **GetBlock (long type, long theID, long index, BlockRec **srcBlock);
// START~ SUBS-ClipQ
long ClipStart (short clipID, short fps);
short ClipRate (short clipID);
void GetClipTitle (short clipID, StringPtr str, char *alias);
void SetClipTitle (short clipID, StringPtr str);
long ClipSize (short clipID, short fps);
long ClipWidth (short clipID, short fps);
long GetClipMarker (short clipID, short marker, short fps);
void SetClipMarker (short clipID, short marker, long value, short fps);
void ClearClipMarkers (short clipID);
short ClipFile (short clipID);
short ClipFlags (short clipID);
void SetClipAspect (short clipID, short aspect);
short ClipAspect (short clipID);
short CountClipMarkers (short clipID);
short FindClipMarker (short clipID, long value, short fps);
short PreviousClipMarker (short clipID, long value, short fps);
short NextClipMarker (short clipID, long value, short fps);
short GetClipBackwards (short clipID);
void SetClipBackwards (short clipID, short backwards);
// START~ SUBS-FileQ
void GetFSSpec (short fileID, FSSpec *thespec);
short OpenFile (short theID);
short OpenRFile (short theID);
void ReleaseFile (short theID);
void ReleaseRFile (short theID);
short CloseUp (long n);
short FindFType (StringPtr name, long dirID, short vRefNum, long *ftype);
void FileSubscribe (short fileID);
void FileCancel (short theID);
long GetFileType (short theID);
long GetFileDraw (short theID);
long GetDrawType (long filetype);
long GetHDLRType (long filetype);
short GetTypeFlags (long filetype);
// START~ SUBS-Debug
void PrDebug (short panel, char *str, ... );
// START~ SUBS-Filecopy
short FileCopy (FSSpec *src, FSSpec *dst);
// START~ SUBS-Local_Utils
void SpinCurs (short delay);
void StopCurs (void);
// Beaker move this into Utils.c/h
char WhichCell (Point where, Cell *whichcell, ListHandle thelist);
char CheckStop (void);
char CheckStopUpdate (void);
// START~ SUBS-Messages
char SpecialGetFile (FSSpec *thespec, short numTypes, OSType *types, StringPtr origName,
short dlgID, long *type);
char SpecialGetFilePreview (FSSpec *thespec, short numTypes, OSType *types, StringPtr origName,
short dlgID, long *type, WindowPtr theWindow);
short LocateCreateFile (short numTypes, SFTypeList typelist, StandardFileReply *reply, StringPtr locateprompt,
StringPtr createprompt, StringPtr origname, char showFree);
void MyPutFile (StringPtr prompt, StringPtr origname, StandardFileReply *reply);
char GetFolder (long *dirID, short *vrefnum, short numtypes, OSType *types, long theID, long dlgID);
char GetFolderOrFile (StandardFileReply *reply, short numTypes, OSType *types, long theID, long dlgID);
char GeneralGetColor (StringPtr prompt, RGBColor *incolor, RGBColor *outcolor);
// START~ SUBS-Window
void ShowModal (WindowPtr theWindow);
void DisposeModal (WindowPtr theWindow);
// START~ SUBS
enum {
tsDelta = 0x01,
tsHours = 0x02,
tsOneHour = 0x04
};
enum { // flags for BetterNewGWorld
gwFourPlanes = 1, // set pixmap cmpCount to 4
gwKeepLocal = 2, // allocate in local memory
gwLockPixels = 4, // lock down the pixels
gwExtraRAM = 8 // leave extra memory around
};
//========================================================================================
// Types related to the SuperFile package
//========================================================================================
typedef struct {
short ref; // Macintosh file reference number of the file in question
long bufSize; // Size of the readahead buffer in bytes
Ptr bufStart; // The readahead buffer
Ptr bufPtr; // The current location in the readahead buffer
long bufPos; // The file offset of the first byte of our buffer
long diskPos; // The current disk file position
} SuperFileRec, *SuperFilePtr;
void SetFont (long which);
WindowPtr GetFirstWind (long type);
pascal char modalfilter (DialogPtr thedialog, EventRecord *event, short *itemhit);
pascal char notextfilter (DialogPtr thedialog, EventRecord *event, short *itemhit);
pascal char hoursfilter (DialogPtr thedialog, EventRecord *event, short *itemhit);
pascal char decimalfilter (DialogPtr thedialog, EventRecord *event, short *itemhit);
short CenterModal (short theID);
short CenterModalKeys (short theID);
short MyModal (WindowPtr overwindow, short theID);
void SeriousErr (StringPtr str1, StringPtr str2, StringPtr str3, long num);
short AlertSystem (short type, char hascancel, short str1x, short str1num,short str2x, short str2num);
DialogPtr MyGetNewDialog (short theID, Ptr storage, WindowPtr behind);
void DrawCorner (WindowPtr theWindow);
void MakeClipTitle (short clipID, StringPtr str);
void NewClipWindTitle (WindowPtr theWindow, short clipID);
long GetRate (short flags);
void FixListSize (ListHandle thelist);
void Long2Rect (LongRect *src, Rect *dst);
void Rect2Long (Rect *src, LongRect *dst);
void StringTrunc (StringPtr instr, StringPtr outstr, short width);
void TruncLength (StringPtr instr, short width);
void MySetCursor (short theID);
char IsIncremental (FSSpec *therec);
void IncrementSpec (FSSpec *therec);
void NumToQuan (long num, StringPtr str);
void Time2Str (long frame, StringPtr str, short fps, short flags);
long Str2Time (StringPtr str, short len, short fps);
void ParseTimecode (StringPtr src, BIN_TC *timecode);
void FormatTimecode (BIN_TC *timecode, StringPtr str);
void StringInABox (short which, Rect *box, short style, short listID, long value1, ... );
Handle ExpandString (short which, short listID, long value1, ... );
void MakeClipSnip (short clipID, short theID, StringPtr name);
void DoExpandString (StringPtr src, short srclength, Handle dst, short *dstlength, long *parms, short listID);
void OffscreenBox (StringPtr str, long size, Rect *box, short style);
char GetPrefItem (void *item, long len, long type, long theID, void *initial);
void SetPrefItem (void *item, long len, long type, long theID);
void DeletePrefItem (long type, short theID);
void Color82RGB (Color8 *incolor, RGBColor *outcolor);
void RGB2Color8 (RGBColor *incolor, Color8 *outcolor);
void GetWindSpecs (WindowPtr theWindow, Rect *box);
char exists (StringPtr name, short vrefnum, long dirID);
void BigSetCValue (DialogPtr thedlg, short item, long value);
long BigGetCValue (DialogPtr thedlg, short item);
void BigSetCMax (DialogPtr thedlg, short item, long max);
long BigGetCMax (DialogPtr thedlg, short item);
void BigSetCMin (DialogPtr thedlg, short item, long min);
long BigGetCMin (DialogPtr thedlg, short item);
void DitherBox (DialogPtr thedlg, Rect *box, RGBColor *thecolor);
short SafeNewGWorld (GWorldPtr *theworld, short depth, Rect *box,
CTabHandle ctab, GDHandle gdev, GWorldFlags flags);
short BetterNewGWorld (GWorldPtr *theworld, short depth, Rect *box, short flags);
Handle ExtraNewHandle (long size);
void GetUserRect (short DITLID, short item, Rect *box);
void GetStartupRect (short item, Rect *box);
void PositionWindow (WindowPtr target, Rect *box);
pascal short freeHook (short item, DialogPtr thedlg, void *data);
void DragRect (Point spot, Rect *box);
short SafeSetupAIFFHeader (short ref, short channels, unsigned long speed,
short bits, long compression, long numBytes, long numFrames);
short GetModifiers (EventRecord *theEvent);
OSErr SuperFileInit (short ref, long bufferSize, SuperFilePtr superData);
OSErr SuperFileRead (SuperFilePtr superData, long *userCount, Ptr outBuf);
OSErr SuperFileSeek (SuperFilePtr superData, long position);
OSErr SuperFileDispose (SuperFilePtr superData);
#define kMaxComments 3
Handle GetComment (Handle text, short item);
void SetComment (Handle *text, short item, Handle comment);
// Used to be BeakerGlue.c stuff
Handle BuildString (short which, short listID, long value1, ... );
void UpdateAllWindows (void);
void MakeWindowForFile (OSType fileType, long reserved, FSSpec *theFile);
void MakeWindowForTextFile (FSSpec *theFile);
// START~ Utils
//========================================================================================
// General Macintosh routines
//========================================================================================
#ifndef PrPPC
typedef pascal void (*UserItemProcPtr) (WindowPtr theWindow, short item);
#endif
// Memory
void LockHHi (void *h);
short SafeSetHandleSize (void *h, long size);
void FillMem (void *dest, long count, char value);
char StructsSame (void *a, void *b, long size);
long GetRowBytes (GWorldPtr theWorld);
Ptr GetGWorldBase (GWorldPtr theWorld);
// Dialogs
void EnableDItem (DialogPtr theDialog, short item);
void DisableDItem (DialogPtr theDialog, short item);
void HiliteDControl (DialogPtr theDialog, short item, short value);
short GetCValue (DialogPtr theDialog, short item);
void SetCValue (DialogPtr theDialog, short item, short value);
short GetGroupVal (DialogPtr theDialog, short first, short last);
void SetGroupVal (short value, WindowPtr theWindow, short first, short last);
void DrawDItem (DialogPtr theDialog, short item);
void GetDRect (DialogPtr theDialog, short item, Rect *box);
void SetDRect (WindowPtr thewindow, short item, Rect *box);
void InvalItem (DialogPtr theDialog, short item);
void GetDType (DialogPtr theDialog, short item, short *itemType);
void GetDHandle (DialogPtr theDialog, short item, Handle *itemHand);
void ModifyDItem (DialogPtr theDialog, short item, Handle itemHand, Rect *box);
void UserItem (DialogPtr theDialog, short item, UserItemProcPtr theProc);
void FlashControl (DialogPtr theDialog, short item);
void FrameGrayButton (DialogPtr theDialog, short item, char gray);
void FrameButton (DialogPtr theDialog, short item);
pascal void ButtonFrame (DialogPtr theDialog, short item);
void PositionDialog (short theID, Point *where);
char Validate (DialogPtr theDialog, short item, long min, long max);
void SetIVal (DialogPtr theDialog, short item, long val);
long GetIVal (DialogPtr theDialog, short item);
void SetEText (DialogPtr theDialog, short item, StringPtr str);
void GetEText (DialogPtr theDialog, short item, StringPtr str);
pascal void DrawItemBox (DialogPtr theDialog, short item);
pascal void DrawItemFrame (DialogPtr theDialog, short item);
void SetCMax (DialogPtr theDialog, short item, short value);
short GetCMax (DialogPtr theDialog, short item);
void SetCRef (DialogPtr theDialog, short item, long value);
long GetCRef (DialogPtr theDialog, short item);
void SetCAction (DialogPtr theDialog, short item, ProcPtr theProc);
void SetResCTitle (DialogPtr theDialog, short item, short resID, short strNum);
void OffsetCSize (DialogPtr theDialog, short item, short h, short v);
void OffsetControl (DialogPtr theDialog, short item, short h, short v);
void DrawAControl (DialogPtr theDialog, short item);
void SafeDrawControl (DialogPtr theDialog, short item, short part);
void SafeSetCValue (DialogPtr theDialog, short item, short value);
// Windows
void CenterWin2Win (WindowPtr moveWindow, WindowPtr overWindow);
void CenterWinOffset (WindowPtr theWindow, Rect *box, short h, short v);
void CenterWindow (WindowPtr theWindow, Rect *box);
void CenterWindowOnMain (WindowPtr theWindow);
// Strings
void Append (StringPtr str1, StringPtr str2);
void StrCopy (StringPtr src, StringPtr dst);
char StringsSame (StringPtr str1, StringPtr str2);
void TypeToStr (long type, StringPtr str);
short FindIndString (StringPtr str, short theID);
// Graphics
void FrameErase (Rect *box);
void SetGray (unsigned short value);
void SetBackGray (unsigned short value);
void SetColor (unsigned short red, unsigned short green, unsigned short blue);
void SetBackColor (unsigned short red, unsigned short green, unsigned short blue);
void SetColorFace (short face);
void EraseGrow(WindowPtr theWindow);
short DepthOf (GrafPtr thePort);
char pt2GDevice (Point thePoint, GDHandle *theDevice);
char pt2GDeviceRect (Point thePoint, Rect *theRect);
void VertCenter (StringPtr str, Rect *box, short spacing);
void DrawSTRVert (short resID, short strNum, Rect *box, short font, short size, short spacing);
void PinPt (Point *where, Rect *box);
void DrawSIC4 (short resID, Rect *box, short mode);
void DrawICL8 (short resID, GrafPtr thePort, Rect *box);
void DrawICL8Hand (Handle theicl, GrafPtr thePort, Rect *box);
void DrawFullICL8Hand (Handle theicl, GrafPtr thePort, Rect *box);
GDHandle SlotToGD (short slot);
void SlotToRect (short slot, Rect *box);
char PtClose (Point pt1, Point pt2);
void HatchBox (Rect *box);
CursPtr GetArrow (void);
Boolean EqualColor (RGBColor *color1, RGBColor *color2);
Boolean EqualColor8 (Color8 *color1, Color8 *color2);
// List Manager lists
short FindSelect (ListHandle theList);
void SetSelect (ListHandle theList, short item);
// Data lists
short DataLookup (short resID, short item);
short ReverseLookup (short resID, short value);
void DeleteHandItem (short which, void *data, short dataSize);
void InsertHandItem (short which, void *data, short dataSize, void *item);
// Files
short DirIDFromPath (StringPtr path, long *dirID, short *vRefNum);
short PathFromDirID (long dirID, short vRefNum, StringPtr path);
short CountVolumes (void);
short GetIndVolume (short which);
short GetVolIndex (short ref, short count);
// Menus
void WidenMenu2Box (MenuHandle theMenu, Rect *box);
void WidenMenu (DialogPtr theDialog, short item);
short GetMenuWidth (MenuHandle themenu);
// Math
short LimitLong (long num);
long QuickAbs (long val);
Fixed FixMulDiv (Fixed value, long mul, long div);
Fixed FixedDiv (Fixed value, Fixed div);
#ifdef PrPPC
long OSTypeFromPString (Str255 pString);
#else
// Inline definitions
#pragma parameter ROMMoveHHi(__A0)
pascal void ROMMoveHHi(Handle h)
= 0xA064;
#pragma parameter __D0 ROMStripAddress(__D0)
pascal Ptr ROMStripAddress(Ptr addr)
= 0xA055;
#pragma parameter __D0 ROMGestalt(__D0, __A1)
pascal OSErr ROMGestalt(OSType selector, long *response)
= { 0xA1AD, 0x2288 };
#endif // PrPPC
// Interface-compatibility routines that are different between 68K and PowerPC. On the
// 68K, these all just call through, so eventually we can just eliminate the callthrough
// routines and use #defines to make the preprocessor whack the names back to the non-Pr
// name on the 68K.
void PrModalDialog (ModalFilterProcPtr filterProc, short *itemHit);
pascal void PrCustomGetFile (FileFilterYDProcPtr fileFilter, short numTypes,
SFTypeList typeList, StandardFileReply *reply, short dlgID, Point where,
DlgHookYDProcPtr dlgHook, ModalFilterYDProcPtr filterProc, short *activeList,
ActivateYDProcPtr activateProc, void *yourDataPtr);
pascal void PrCustomPutFile (ConstStr255Param prompt, ConstStr255Param defaultName,
StandardFileReply *reply, short dlgID, Point where, DlgHookYDProcPtr dlgHook,
ModalFilterYDProcPtr filterProc, short *activeList, ActivateYDProcPtr activateProc,
void *yourDataPtr);
pascal void PrCustomGetFilePreview (FileFilterYDProcPtr fileFilter, short numTypes,
SFTypeList typeList, StandardFileReply *reply, short dlgID, Point where,
DlgHookYDProcPtr dlgHook, ModalFilterYDProcPtr filterProc, short *activeList,
ActivateYDProcPtr activateProc, void *yourDataPtr);
pascal ComponentResult PrSCSetInfo (ComponentInstance ci, OSType type,
SCModalFilterProcPtr scModalFilter, SCModalHookProcPtr scModalHook, long refCon,
StringPtr customName);
extended80 inttox80 (long value);
extended80 longdoubletox80 (long double value);
long double x80tolongdouble (extended80 value);
long x80toint (extended80 value);
long double pie (void);
pascal short PrTrackControl (ControlHandle theControl,Point thePoint,ProcPtr actionProc);
pascal OSErr PrSndNewChannel (SndChannelPtr *chan, short synth, long init,
SndCallBackProcPtr userRoutine);
pascal OSErr PrSndDisposeChannel (SndChannelPtr chan, Boolean quietNow);
pascal ComponentResult PrSGSettingsDialog(SeqGrabComponent s, SGChannel c,
short numPanels, Component *panelList, long flags, SGModalFilterProcPtr proc,
long procRefNum);